#!/bin/bash

source /home/shell/util.sh

if [[ "$(ostype)" == "Ubuntu" ]]; then
    mysql_version=0.8.16-1
    wget https://dev.mysql.com/get/mysql-apt-config_${mysql_version}_all.deb && dpkg -i mysql-apt-config_${mysql_version}_all.deb
    rm -rf mysql-apt-config_0.8.16-1_all.deb
    apt update

    apt install -y mysql-client libmysqlclient-dev

    rm -rf /etc/apt/sources.list.d/mysql.list
    apt update
else
    rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
    yum install -y mysql-client
fi

